/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ComExWeb.dominio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Entity
@Table(schema = "desenv", name = "REGULAMENTO")
//@NamedQueries({ @NamedQuery(name = "Regulamento.findAll", query = "SELECT r FROM Regulamento r")})
public class Regulamento implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_REGULAMENTO")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long idRegulamento;
    
    @Column(name = "NM_REGULAMENTO")
    private String nmRegulamento;


    @ManyToOne(cascade={CascadeType.MERGE,CascadeType.PERSIST})
    @JoinColumn(name="OFERTA")
    private Oferta oferta;

    public Regulamento() {
    }

    public Long getIdRegulamento() {
        return idRegulamento;
    }

    public void setIdRegulamento(Long idRegulamento) {
        this.idRegulamento = idRegulamento;
    }

    public String getNmRegulamento() {
        return nmRegulamento;
    }

    public void setNmRegulamento(String nmRegulamento) {
        this.nmRegulamento = nmRegulamento;
    }

    public Oferta getOferta() {
        return oferta;
    }

    public void setOferta(Oferta oferta) {
        this.oferta = oferta;
    }

    

}
